const Koa = require('koa')
const app = new Koa()
const bodyparser = require('koa-bodyparser')
// 引入路由
const indexRouter = require('./router/users')
const blogsRouter = require('./router/blogs')

//
app.use(bodyparser())

app.use(indexRouter.routes())
app.use(blogsRouter.routes())

app.listen(8000, () => {
  console.log('server url is: http://localhost:8000')
})
